package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QuestionpaperMapper;
import com.ruoyi.system.domain.Questionpaper;
import com.ruoyi.system.service.IQuestionpaperService;

/**
 * 调查问卷Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-24
 */
@Service
public class QuestionpaperServiceImpl implements IQuestionpaperService 
{
    @Autowired
    private QuestionpaperMapper questionpaperMapper;

    /**
     * 查询调查问卷
     * 
     * @param id 调查问卷主键
     * @return 调查问卷
     */
    @Override
    public Questionpaper selectQuestionpaperById(Long id)
    {
        return questionpaperMapper.selectQuestionpaperById(id);
    }

    /**
     * 查询调查问卷列表
     * 
     * @param questionpaper 调查问卷
     * @return 调查问卷
     */
    @Override
    public List<Questionpaper> selectQuestionpaperList(Questionpaper questionpaper)
    {
        return questionpaperMapper.selectQuestionpaperList(questionpaper);
    }

    /**
     * 新增调查问卷
     * 
     * @param questionpaper 调查问卷
     * @return 结果
     */
    @Override
    public int insertQuestionpaper(Questionpaper questionpaper)
    {
        return questionpaperMapper.insertQuestionpaper(questionpaper);
    }

    /**
     * 修改调查问卷
     * 
     * @param questionpaper 调查问卷
     * @return 结果
     */
    @Override
    public int updateQuestionpaper(Questionpaper questionpaper)
    {
        return questionpaperMapper.updateQuestionpaper(questionpaper);
    }

    /**
     * 批量删除调查问卷
     * 
     * @param ids 需要删除的调查问卷主键
     * @return 结果
     */
    @Override
    public int deleteQuestionpaperByIds(Long[] ids)
    {
        return questionpaperMapper.deleteQuestionpaperByIds(ids);
    }

    /**
     * 删除调查问卷信息
     * 
     * @param id 调查问卷主键
     * @return 结果
     */
    @Override
    public int deleteQuestionpaperById(Long id)
    {
        return questionpaperMapper.deleteQuestionpaperById(id);
    }

    @Override
    public int shenheQuestionpaperById(Long id) {
        return  questionpaperMapper.shenheQuestionpaperById(id);
    }
}
